<template>
  <div class="questions-container">
    <el-card shadow="never">
      <el-form :inline="true">
        <el-button
          icon="el-icon-edit"
          type="success"
          class="filter-item fr"
          style="margin-left: 10px"
          size="small"
          >新增试题</el-button
        >
        <el-form-item label="学科">
          <el-input></el-input>
        </el-form-item>
      </el-form>
      <el-alert></el-alert>
      <el-table :data="questionsList">
        <el-table-column prop="number" label="试题编号"> </el-table-column>
        <el-table-column prop="direction" label="学科"> </el-table-column>
        <el-table-column prop="date" label="目录"> </el-table-column>
        <el-table-column prop="date" label="题型"> </el-table-column>
        <el-table-column prop="date" label="题干"> </el-table-column>
        <el-table-column prop="addDate" label="录入时间"> </el-table-column>
        <el-table-column prop="date" label="难度"> </el-table-column>
        <el-table-column prop="date" label="录入人"> </el-table-column>
        <el-table-column label="操作">
          <template> </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
import { list } from '@/api/hmmm/questions.js'
export default {
  name: 'questions',
  data () {
    return {
      questionsList: []
    }
  },
  created () {
    this.getQuestionsList()
  },
  methods: {
    async getQuestionsList () {
      const { data: res } = await list()
      // console.log(res)
      this.questionsList = res.items
    }
  }
}
</script>

<style scoped lang='less'>
/deep/ .el-card {
  margin: 20px;
  .addQuestionbtn {
    float: right;
    line-height: 1;
    display: inline-block;
    &::after {
      content: "";
      display: block;
      height: 0;
      overflow: hidden;
      clear: both;
    }
  }
}
</style>
